home *** CD-ROM | disk | FTP | other *** search
- /// Include
- #include <exec/types.h> // exec
- #include <exec/libraries.h>
- #include <exec/memory.h>
- #include <dos/dos.h> // dos
- #include <libraries/mui.h> // libraries
- #include <clib/muimaster_protos.h> // clib
- #include <clib/alib_protos.h>
- #include <proto/exec.h> // proto
- #include <proto/dos.h>
- #include <proto/muimaster.h>
-
- #include <string.h>
- #include <stdio.h>
- #include <ctype.h>
-
- #include "CManager_mcc.h"
- ///
- /// Data
- struct Library *MUIMasterBase;
- ///
-
- /// main
- int main( int argc, char *argv[] )
- {
- Object *AppObj, *MainWin, *obj;
-
- if(!( MUIMasterBase = OpenLibrary( "muimaster.library", MUIMASTER_VMIN )))
- return( 20 );
-
- if( AppObj = ApplicationObject,
-
- MUIA_Application_Title, "CMTest",
- MUIA_Application_Version, "$VER: CMTest 1.0 (17.1.99)",
- MUIA_Application_Copyright, "Copyright ©1999 by Simone Tellini",
- MUIA_Application_Author, "Simone Tellini <wiz@vapor.com>",
- MUIA_Application_Description, "CManager.mcc test program",
- MUIA_Application_Base, "CMTEST",
-
- SubWindow, MainWin = WindowObject,
-
- MUIA_Window_ID, MAKE_ID( 'M', 'A', 'I', 'N' ),
- MUIA_Window_Title, "CMTest - ©1999 Simone Tellini",
-
- WindowContents, VGroup,
-
- Child, obj = CManagerObject,
- MUIA_CManager_HideFTP, TRUE,
- End,
- End,
- End,
- End ) {
- ULONG sigs = 0;
-
- DoMethod( MainWin, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, MUIV_Notify_Application, 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit );
-
- // you MUST call the following
- DoMethod( obj, MUIM_CManager_LoadData, NULL, NULL );
-
- set( MainWin, MUIA_Window_Open, TRUE );
-
- while( DoMethod( AppObj, MUIM_Application_NewInput, &sigs ) != MUIV_Application_ReturnID_Quit ) {
- if( sigs ) {
-
- sigs = Wait( sigs | SIGBREAKF_CTRL_C );
-
- if( sigs & SIGBREAKF_CTRL_C )
- break;
- }
- }
-
- get( obj, MUIA_CManager_Changed, &sigs );
-
- if( sigs )
- DoMethod( obj, MUIM_CManager_SaveData, TRUE, NULL );
-
- MUI_DisposeObject( AppObj );
- }
-
- CloseLibrary( MUIMasterBase );
-
- return( 0 );
- }
- ///
-
-
-